#include "tinyrpc/net/eventloopthreadpool.h"
#include <iostream>
using namespace TinyRPC;
int main(){
    EventLoopThreadPool pool(2);
    pool.start();
    pool.getNextLoop(0)->runAfter(1, Task([&](){
        sleep(1);
        std::cout<<"in eventloop1"<<std::endl;
    },false));

    pool.getNextLoop(1)->runAfter(1, Task([&](){
        sleep(2);
        std::cout<<"in eventloop2"<<std::endl;
    },false));

    

    sleep(3);
    pool.quit();
}